// 开始
const start = new joint.shapes.bpmn.Event({
	position: {
		x: 34,
		y: 35
	},
	size: {
		width: 50,
		height: 50
	},
	eventType: "intermediate",
	bpmnType: "UserTask",
	bpmnSubType: "ContinueService",
	attrs: {
		".label": {
			fill: "#fff",
			text: "开始",
			x: 0
		},
		".body": {
			refWidth: "100%",
			refHeight: "100%",
			rx: "1%",
			ry: "2%",
			stroke: "none",
			fill: "#E6B55E"
		}
	}
});

// 结束
const end = new joint.shapes.bpmn.Event({
	position: {
		x: 34,
		y: 95
	},
	size: {
		width: 50,
		height: 50
	},
	eventType: "end",
	bpmnType: "EndEvent",
	bpmnSubType: "EndEvent",
	attrs: {
		".label": {
			fill: "#fff",
			text: "结束"
		},
		".body": {
			refWidth: "100%",
			refHeight: "100%",
			rx: "1%",
			ry: "2%",
			stroke: "none",
			fill: "#869FBE"
		}
	}
});

// 排他
const exclusive = new joint.shapes.erd.Relationship({
	position: {
		x: 34,
		y: 155
	},
	size: {
		width: 54,
		height: 48
	},
	activityType: "task",
	bpmnType: "ExclusiveGateway",
	bpmnSubType: "ExclusiveGateway",
	attrs: {
		".outer": {
			fill: "rgba(246,118,19,0.10)",
			stroke: "#F67613",
			"stroke-width": 1,
			"stroke-dasharray": "0"
		},
		text: {
			"text": "排他",
			"font-size": 12,
			"font-weight": "Normal",
			"fill": "#F67613",
			"stroke-width": 1
		}
	}
});

// 并行
const parallel = new joint.shapes.erd.Relationship({
	position: {
		x: 34,
		y: 215
	},
	size: {
		width: 54,
		height: 48
	},
	activityType: "task",
	bpmnType: "ParallelGateway",
	bpmnSubType: "ParallelGateway",
	attrs: {
		".outer": {
			fill: "rgba(36,175,149,0.10)",
			stroke: "#03BD7F",
			"stroke-width": 1,
			"stroke-dasharray": "0"
		},
		text: {
			"text": "并行",
			"font-size": 12,
			"font-weight": "Normal",
			"fill": "#03BD7F",
			"stroke-width": 1
		}
	},
	bpmnData: {
		type: "ParallelGateway",
		condition: {
			type: ""
		}
	}
});

// 策略集
const policy = new joint.shapes.bpmn.Activity({
	position: {
		x: 10,
		y: 283
	},
	size: {
		width: 100,
		height: 28
	},
	// content: workflowEditorLang.common("policy"), // 策略集
	content: "<span class='dot'>策</span><span class='ellipsis'>策略集</span>",
	activityType: "task",
	bpmnType: "ServiceTask",
	bpmnSubType: "PolicyTask",
	attrs: {
		".body": {
			refWidth: "100%",
			refHeight: "100%",
			rx: "14px",
			ry: "14px",
			stroke: "#CCD9FD",
			fill: "#EAEEFA"
		}
	}
});

// 三方服务
const threeServices = new joint.shapes.bpmn.Activity({
	position: {
		x: 10,
		y: 327
	},
	size: {
		width: 100,
		height: 28
	},
	// content: workflowEditorLang.common("service"), // 三方服务
	content: "<span class='dot' style=\"background: #CFAB67;\">三</span><span class='ellipsis'>三方服务</span>",
	activityType: "task",
	bpmnType: "ServiceTask",
	bpmnSubType: "ServiceTypeTask",
	attrs: {
		".body": {
			refWidth: "100%",
			refHeight: "100%",
			rx: "14px",
			ry: "14px",
			stroke: "#CCD9FD",
			fill: "#EAEEFA"
		}
	}
});

// 决策补充
const decisionSupplement = new joint.shapes.bpmn.Activity({
	position: {
		x: 10,
		y: 369
	},
	size: {
		width: 100,
		height: 28
	},
	// content: workflowEditorLang.common("supplement"), // 决策补充
	content: "<span class='dot' style=\"background: #67CFCB;\">补</span><span class='ellipsis'>决策补充</span>",
	activityType: "task",
	bpmnType: "UserTask",
	bpmnSubType: "DecisionTask",
	attrs: {
		".body": {
			refWidth: "100%",
			refHeight: "100%",
			rx: "14px",
			ry: "14px",
			stroke: "#CCD9FD",
			fill: "#EAEEFA"
		}
	}
});

// 决策工具
const decisionTool = new joint.shapes.bpmn.Activity({
	position: {
		x: 10,
		y: 411
	},
	size: {
		width: 100,
		height: 28
	},
	// content: workflowEditorLang.common("tool"), // 决策工具
	content: "<span class='dot' style=\"background: #CF6767;\">工</span><span class='ellipsis'>决策工具</span>",
	activityType: "task",
	bpmnType: "ServiceTask",
	bpmnSubType: "DecisionServiceTask",
	attrs: {
		".body": {
			refWidth: "100%",
			refHeight: "100%",
			rx: "14px",
			ry: "14px",
			stroke: "#CCD9FD",
			fill: "#EAEEFA"
		}
	}
});

// 模型
const model = new joint.shapes.bpmn.Activity({
	position: {
		x: 10,
		y: 453
	},
	size: {
		width: 100,
		height: 28
	},
	// content: workflowEditorLang.common("model"), // 模型
	content: "<span class='dot' style=\"background: #4DA9C9;\">模</span><span class='ellipsis'>模型</span>",
	activityType: "task",
	bpmnType: "ServiceTask",
	bpmnSubType: "ModelServiceTask",
	attrs: {
		".body": {
			refWidth: "100%",
			refHeight: "100%",
			rx: "14px",
			ry: "14px",
			stroke: "#CCD9FD",
			fill: "#EAEEFA"
		}
	}
});

// 计算公式
const calculate = new joint.shapes.bpmn.Activity({
	position: {
		x: 10,
		y: 495
	},
	size: {
		width: 100,
		height: 28
	},
	// content: workflowEditorLang.common("formula"), // 计算公式
	content: "<span class='dot' style=\"background: #D97B4E;\">算</span><span class='ellipsis'>计算公式</span>",
	activityType: "task",
	bpmnType: "ServiceTask",
	bpmnSubType: "FormulaServiceTask",
	attrs: {
		".body": {
			refWidth: "100%",
			refHeight: "100%",
			rx: "14px",
			ry: "14px",
			stroke: "#CCD9FD",
			fill: "#EAEEFA"
		}
	}
});

// 冠军挑战者
const challenger = new joint.shapes.bpmn.Activity({
	position: {
		x: 10,
		y: 537
	},
	size: {
		width: 100,
		height: 28
	},
	// content: workflowEditorLang.common("challenger"), // 冠军挑战者
	content: "<span class='dot' style=\"background: #9367C6;\">挑</span><span class='ellipsis'>冠军挑战者</span>",
	activityType: "task",
	bpmnType: "ServiceTask",
	bpmnSubType: "ChallengerServiceTask",
	attrs: {
		".body": {
			refWidth: "100%",
			refHeight: "100%",
			rx: "14px",
			ry: "14px",
			stroke: "#CCD9FD",
			fill: "#EAEEFA"
		}
	}
});

// 动作
const action = new joint.shapes.bpmn.Activity({
	position: {
		x: 10,
		y: 579
	},
	size: {
		width: 100,
		height: 28
	},
	content: "<span class='dot' style=\"background: #8390DB;\">自</span><span class='ellipsis'>动作</span>",
	activityType: "task",
	bpmnType: "ServiceTask",
	bpmnSubType: "ActionServiceTask",
	attrs: {
		".body": {
			refWidth: "100%",
			refHeight: "100%",
			rx: "14px",
			ry: "14px",
			stroke: "#CCD9FD",
			fill: "#EAEEFA"
		}
	}
});

const Items = [
	start,
	end,
	exclusive,
	parallel,
	policy,
	threeServices,
	decisionSupplement,
	decisionTool,
	model,
	calculate,
	challenger,
	action
];

export default Items;
